
import {simpleServer} from '@/tools/servers'

/**
 * 省份
 */
export class ProvincesService {
    // 分页查询列表
    static findProvincess (pageDTO) {
        var httpMethod = 'POST';
        var body = simpleServer.getArgs(this.findProvincess,arguments,'POST');
        return simpleServer.connection(httpMethod, '/simple/businessRegistration/Provinces/findProvincess', body);
    }


    //根据省份Id查询省份
    static findProvinces (provincesId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findProvinces ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/businessRegistration/Provinces/findProvinces',body);
    }

    //为了编辑,根据省份Id查询省份
    static findProvincesForEdit(provincesId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findProvincesForEdit ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/businessRegistration/Provinces/findProvincesForEdit',body);
    }

    //为了查看,根据省份Id查询省份，所有外键字段的名称都已加载
    static findProvincesForView(provincesId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findProvincesForView ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/businessRegistration/Provinces/findProvincesForView',body);
    }

    //创建新的省份
    static createProvinces() {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.createProvinces,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/businessRegistration/Provinces/createProvinces',body);
    }

    //保存省份
    static saveProvinces(provinces) {
        var httpMethod = 'POST';
        var body = simpleServer.getArgs(this.saveProvinces,arguments,'POST');
        return simpleServer.connection(httpMethod, '/simple/businessRegistration/Provinces/saveProvinces', body);
    }

    //编辑省份
    static updateProvinces (provinces) {
        var httpMethod = 'POST';
        var body = simpleServer.getArgs(this.updateProvinces,arguments,'POST');
        return simpleServer.connection(httpMethod, '/simple/businessRegistration/Provinces/updateProvinces', body);
    }

    //根据省份Id删除省份
    static deleteProvinces (provincesId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.deleteProvinces,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/businessRegistration/Provinces/deleteProvinces',body);
    }

    //为了查看,根据省份Id查询省份，只加载ID 和 名称
    static findProvincessWithIdNameById(provincesId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findProvincessWithIdNameById ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/businessRegistration/Provinces/findProvincessWithIdNameById',body);
    }

    //为了查看,根据省份 名称 查询省份，只加载ID 和 名称
    static findProvincessWithIdNameByName(provincesName) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findProvincessWithIdNameByName ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/businessRegistration/Provinces/findProvincessWithIdNameByName',body);
    }


}
